<?php

namespace app\common\model;

class ModuleSetting extends CommonModel
{
    /**
     * 获取系统设置
     * @param string $name
     * @return bool|mixed
     */
    public static function getSysSetting($name = '')
    {
        $setting = self::get(['id' => 1]);
        if ($setting) {
            $setting['content'] = unserialize($setting['content']);
            if (!empty($name)) {
                return $setting['content'][$name];
            }
            return $setting['content'];
        }
        return false;
    }
}